<div class="row">
  <div class="col-md-6">
    <% if @product.image.present? %>
      <%= image_tag(@product.image.medium.url, class: "thumbnail") %>
    <% else %>
      <%= image_tag("http://placehold.it/400x400&text=No Pic", class: "thumbnail") %>
    <% end %>
  </div>
  <div class="col-md-6">
    <h2> <%= @product.title %> </h2>
    <div style="height:100px;">
      <p>
        <%= @product.description %>
      </p>
    </div>
    <div> Quantity : <%= @product.quantity %> </div>
    <div class="product-price"> ￥ <%= @product.price %> </div>
    <div class="pull-right">
      <% if @product.quantity > 0 %>
        <%= link_to("Add Cart", add_to_cart_product_path(@product),
      method: :post, :class => "btn btn-danger btn-lg") %>
      <% else %>
        selled out
      <% end %>
    </div>
  </div>
</div>
